<?php
class ControllerCommonViewlist extends Controller {   
public function index(){


        $this->load->model('catalog/information');
		$this->load->model('catalog/checkingform');

        $this->template = 'common/viewlist.tpl';
        if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . 'common/viewlist.tpl')) {
            $this->template = $this->config->get('config_template') . 'common/viewlist.tpl';
        } else {
            $this->template = 'common/viewlist.tpl';
        }
        $this->children = array(
            'common/header',
            'common/footer'
        ); 
		
		if($_POST){			
			$ids= trim($_POST['hdelId'],",");
			//echo '<pre>'; print_r($ids); exit;
			$result=$this->model_catalog_checkingform->delUserData($ids);		
		}
		$result=$this->model_catalog_checkingform->getUserData();
		$this->data['userdata']=$result;
		//echo '<pre>';print_r($result);exit;
		$this->data['vurl']=$this->url->link('common/viewuserdetailes', 'token=' . $this->session->data['token'], 'SSL');
		$this->data['regurl']=$this->url->link('common/checkinform', 'token=' . $this->session->data['token'], 'SSL');	
		$this->data['envurl']=$this->url->link('common/environmental', 'token=' . $this->session->data['token'], 'SSL');
        
		
		
		$this->response->setOutput($this->render());
		
    }

	
}
?>